package org.prototype.bank.domain;

import java.util.Date;

public class Transaction {
	// For Hibernate
	private long id = -1;

	private Account fromAccount;
	private Account toAccount;
	private double amount;
	private Date date;

	// For Hibernate
	Transaction() {
	}

	public Transaction(Account fromAccount, Account toAccount, double amount,
			Date date) {
		this.fromAccount = fromAccount;
		this.toAccount = toAccount;
		this.amount = amount;
		this.date = date;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public double getAmount() {
		return amount;
	}

	public Date getDate() {
		return date;
	}

	public Account getFromAccount() {
		return fromAccount;
	}

	public Account getToAccount() {
		return toAccount;
	}
}
